package com.ruoyi.cloudcourse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cloudcourse.mapper.FeatherChapterFileMapper;
import com.ruoyi.cloudcourse.domain.FeatherChapterFile;
import com.ruoyi.cloudcourse.service.IFeatherChapterFileService;
import com.ruoyi.common.core.text.Convert;

/**
 * 章节文件Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-14
 */
@Service
public class FeatherChapterFileServiceImpl implements IFeatherChapterFileService 
{
    @Autowired
    private FeatherChapterFileMapper featherChapterFileMapper;

    /**
     * 查询章节文件
     * 
     * @param fileId 章节文件ID
     * @return 章节文件
     */
    @Override
    public FeatherChapterFile selectFeatherChapterFileById(Long fileId)
    {
        return featherChapterFileMapper.selectFeatherChapterFileById(fileId);
    }

    /**
     * 查询章节文件列表
     * 
     * @param featherChapterFile 章节文件
     * @return 章节文件
     */
    @Override
    public List<FeatherChapterFile> selectFeatherChapterFileList(FeatherChapterFile featherChapterFile)
    {
        return featherChapterFileMapper.selectFeatherChapterFileList(featherChapterFile);
    }

    /**
     * 新增章节文件
     * 
     * @param featherChapterFile 章节文件
     * @return 结果
     */
    @Override
    public int insertFeatherChapterFile(FeatherChapterFile featherChapterFile)
    {
        return featherChapterFileMapper.insertFeatherChapterFile(featherChapterFile);
    }

    /**
     * 修改章节文件
     * 
     * @param featherChapterFile 章节文件
     * @return 结果
     */
    @Override
    public int updateFeatherChapterFile(FeatherChapterFile featherChapterFile)
    {
        return featherChapterFileMapper.updateFeatherChapterFile(featherChapterFile);
    }

    /**
     * 删除章节文件对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFeatherChapterFileByIds(String ids)
    {
        return featherChapterFileMapper.deleteFeatherChapterFileByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除章节文件信息
     * 
     * @param fileId 章节文件ID
     * @return 结果
     */
    @Override
    public int deleteFeatherChapterFileById(Long fileId)
    {
        return featherChapterFileMapper.deleteFeatherChapterFileById(fileId);
    }
}
